<script>
	$(function(){
		Namespace.register("EBCMS.Forms");
		EBCMS.Forms.FormSubmit = function FormSubmit(){
			EBCMS.CORE.submit({
				url:'{$_form.action}',
				form:'{$_form.formtime}Form',
				success:function(data){
					EBCMS.MSG.tips('提交成功！');
					$('#lgModal').modal('toggle');
					EBCMS.{$namespace}.refresh();
				}
			});
		};
		EBCMS.FN.tabs('.tabs','.tabboxs');
	});
</script>
<div class="modal-header">
	<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
	<h4 class="modal-title">{$_form.group}-{$_form.text}</h4>
</div>
<div class="modal-body">
	<form class="form-horizontal" id="{$_form.formtime}Form">
		<div class="tabs">
			<foreach name='_groups' item='_fields'>
				<div class="tab-head">{$key}</div>
			</foreach>
			<notempty name='_extgroups'>
				<foreach name='_extgroups' item='_fields'>
					<div class="tab-head">{$key}</div>
				</foreach>
			</notempty>
		</div>
		<div class="tabboxs">
			<foreach name='_groups' item='_fields'>
				<div class="tab-body">
					<foreach name='_fields' item='_field'>
						<include file="Admin@Common/formfield"/>
					</foreach>
				</div>
			</foreach>
			<notempty name='_extgroups'>
				<foreach name='_extgroups' item='_fields'>
					<div class="tab-body">
						<foreach name='_fields' item='_field'>
							<include file="Admin@Common/formfield"/>
						</foreach>
					</div>
				</foreach>
			</notempty>
		</div>
	</form>
</div>
<div class="modal-footer">
	<button type="button" class="btn btn-success" onclick="EBCMS.Forms.FormSubmit();">提交</button>
	<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
</div>